package ycyc.Games.gomoku.model;

import java.util.ArrayList;
import java.util.List;

import ycyc.Games.gomoku.core.AbsChessBoard;


public class ChessBoard extends AbsChessBoard {
	@Override
	public int getMaxX() {
		return getROWS();
	}
	@Override
	public int getMaxY() {
		return getCOLS();
	}

	@Override
	public List<Point> getFreePoints() {
		List<Point> remaidlist = new ArrayList<Point>();//已经被下过的棋子
		for (int i = 0; i < ROWS; i++) {
			for (int j = 0; j < COLS; j++) {
				Point p= new Point(i, j);
				if(!readylist.contains(p)){
					remaidlist.add(p);
				}
			}
		}
		return remaidlist;
	}
	
	public boolean reset() {
		readylist.clear();
		isBlack=true;
		gameOver=false;
		return true;
	}
	
	public boolean downOnePoint(Point t) {
		readylist.add(t);
		return true;
	}
}
